-- GENERATED SPELL FOR [Wildervar Sentry] --


function spell0_24050(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_24050', 615, 1)
end

function spell1_24050(pUnit, Event) --@Improved Blocking,Self--
pUnit:FullCastSpellOnTarget(3639,pUnit)
pUnit:RegisterEvent('Sorts_24050', 6313, 1)
end

function spell2_24050(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24050', 8308, 1)
end

function Sorts_24050(pUnit, Event)
local choix_sorts_24050 = math.random(0, 2)
if choix_sorts_24050 == 0 then
pUnit:RegisterEvent('spell0_24050', 1, 1)
end
if choix_sorts_24050 == 1 then
pUnit:RegisterEvent('spell1_24050', 1, 1)
end
if choix_sorts_24050 == 2 then
pUnit:RegisterEvent('spell2_24050', 1, 1)
end
end

function mob24050_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24050', math.random(1500, 3000), 1)
end

function mob24050_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24050_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24050_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24050, 1, 'mob24050_Action')
RegisterUnitEvent(24050, 2, 'mob24050_Leave')
RegisterUnitEvent(24050, 3, 'mob24050_Kill')
RegisterUnitEvent(24050, 4, 'mob24050_Die')
